package com.mes.cloud.service.impl;

import com.mes.cloud.service.ValidatorService;
import com.mes.cloud.util.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;
/**
 * @ProjectName: cloud
 * @Package: com.mes.cloud.service.impl
 * @ClassName: RequiredValidatorServiceImpl
 * @Author: xhy
 * @Description: 判断view页面输入的值是否为空的判断规则
 * required 不能为空(即为必填字段)
 * @Date: 2019年9月23日15:17:54
 * @Version: 1.0
 */
@Service("required")
public class RequiredValidatorServiceImpl implements ValidatorService {
    @Override
    public String validator(String type, Object o, Map<String, Object> queryMap) {
        return StringUtils.isEmpty(o)==true?null:"该字段为空";
    }
}
